
package com.wzn.service;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.sql.SQLException;

public final class SpringNamespaceWithMasterSlaveMain {
    

    public static void main(final String[] args) throws SQLException {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:/applicationContextWithMasterSlave.xml");
        OrderService orderService =  applicationContext.getBean(OrderService.class);
        System.out.println("[Monitor] [INFO] orderService:{}"+orderService);

        orderService.insert();
        //orderService.select();
        //orderService.delete();
        //orderService.select();
    }
}
